import Vue from "vue";

import App from "./App.vue";

import home from "./components/home.vue"

import car from "./components/shopcar/car.vue"

import vueRouter from "vue-router"

Vue.use(vueRouter);

import mintui from "mint-ui";

Vue.use(mintui);

import "mint-ui/lib/style.css";

import {Toast} from "mint-ui";
Vue.prototype.Toast = Toast;

import moment from "moment"

Vue.filter("datefmt",function(input,fmtstring) {
	return moment(input).format(fmtstring);
})


import newslist from "./components/news/newslist.vue"

import newsinfo from "./components/news/newsinfo.vue"

import goodslist from "./components/goods/goodslist.vue"

import "../static/mui/css/mui.css"

import common from "./kits/common.js"

Vue.prototype.$common = common;

import photolist from "./components/photo/photolist.vue"

import photoinfo from "./components/photo/photoinfo.vue"

import "../static/css/site.css"

import vueResource from "vue-resource";
Vue.use(vueResource);

import vuePreview from "vue-preview"

Vue.use(vuePreview);

var router1 =  new vueRouter({
	routes:[{
		path:"/",
		redirect:"/home"
	},
	{
		path:"/home",
		component:home
	},{
		path:"/shopcar",
		component:car
	},
	{path:"/news/newslist",component:newslist},
	{path:"/news/newsinfo/:id",component:newsinfo},
	{path:"/photo/photolist",component:photolist},
	{path:"/photo/photoinfo/:id",component:photoinfo},
	{path:"/goods/goodslist",component:goodslist}
	],
	linkActiveClass:"mui-active"
})



new Vue({
	el:"#app",
	render:c=>c(App),
	router:router1
	}
)